package com.sss.hloster0102;

public class TestStudent06 {

	public static void main(String[] args) {
		// 使用不同参数列表的构造方法创建wagnYun，liuJT，nanTh三个学生对象
		Student wangYun = new Student("王云", 22, 1, 4);
		Student liuJT = new Student("刘景涛", 21, 2);
		Student nanTH = new Student("南天华", 1);
		wangYun.learn();
		String rstString = wangYun.doHomework(22);
		System.out.println(rstString);
		liuJT.learn();// 调用liuJT对象的learn()方法
		// 调用liuJT对象的getStuName()和getStuGrade()方法获得属性值
		System.out.println(liuJT.getStuName() + "正在读大学" + liuJT.getStuGrade() + "年级");
		System.out.println(nanTH.doHomework(23));// 调用nanTH对象的doHomework（23）方法
	}

}
